<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateAdminsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('admins', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('account', 20)->index();
            $table->string('password', 50);
            $table->unsignedBigInteger('phone')->nullable()->comment('联系方式');
            $table->string('role', 20)->nullable()->comment('角色');
            $table->string('remark', 100)->nullable()->comment('备注信息');
            $table->integer('status')->default(1)->comment('状态,1: 启用, 2: 禁用');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('admins');
    }
}
